
package entity;

import java.io.Serializable;
import javax.persistence.Entity; 
import javax.persistence.Id;
import javax.persistence.Version;

@Entity
public class Student implements Serializable {
    @Id private int matNr;
    private String name;
    @Version private int version;
    
    public Student() {
    }
    
    public Student (int matNr, String name) {
        this.matNr = matNr;
        this.name = name;
    }
    
    public int getMatNr() {
        return matNr;
    }
    
    public void setMatNr(int matNr) {
        this.matNr = matNr;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public int getVersion() {
        return version;
    }
    
    public void setVersion(int version) {
        this.version = version;
    }
}
